package com.ease.actionscript.mapping.mapper;

import java.util.Set;

public class RemotingDestinationContextMapper extends ServiceManagerClassMapper {

	public static final String PREFIX_REMOTINGDESTINATION = "applicationContext-web-remotingdestination";

	public boolean isCompliant() {
		Set<Class<?>> remotingDestinationClasses = this.getActionScriptMappingContext().getRemotingDestinationClasses(this.projectName);
		return (null != remotingDestinationClasses);
	}

	public void prepare() {
		super.prepare();

		// destinationPath = actionScriptMappingContext.getApplicationContextDestination();
		// String destinationProjectName = this.getProjectName();
		String destinationProjectName = this.getActionScriptMappingContext().getApplicationProject();
		// destinationPath=this.getProjectName()+"/cfg/";
		destinationPath = actionScriptMappingContext.getJavaWorkspacePath() + "/" + destinationProjectName + "/cfg/";

		destinationFileName = PREFIX_REMOTINGDESTINATION + "-" + hyphenProjectName(buildDestinationProjectName(projectName)) + ".xml";
	}

}
